package com.lihaogn.sell.service;

import com.lihaogn.sell.vo.SearchPageVo;
import com.lihaogn.sell.entity.Admin;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @FileName: AdminService
 * @Description: TODO
 * @Author: lihao
 * @Date: 2019-04-22 20:36
 * @Version: 1.0
 */
public interface AdminService {

    /**
     * 获取所有的admin
     * @return
     */
    List<Admin> getAllAdmin();

    /**
     * 根据分页信息获取admin列表
     * @param page
     * @param size
     * @return
     */
    Map<String,Object> queryAdminForPage(String page, String size);

    /**
     * 添加一个admin
     * @param admin
     * @return
     */
    int insertAdmin(Admin admin);

    /**
     * 根据adminName查找admin匹配的个数
     * @param adminName
     * @return
     */
    int queryAdminByName(String adminName);

    /**
     * 更新admin
     * @param admin
     * @return
     */
    int updateAdmin(Admin admin);

    /**
     * 根据adminName查找匹配的admin
     * @param adminName
     * @return
     */
    Admin getAdminByName(String adminName);

    /**
     * 根据name删除admin
     * @param adminName
     * @return
     */
    int deleteAdminByName(String adminName);

    /**
     * 删除多个admin
     * @param request
     * @return
     */
    int deleteAdminsInNames(HttpServletRequest request);

    /**
     * 按条件搜索admin
     * @param searchPageVo
     * @return
     */
    Map<String, Object> searchAdmin(SearchPageVo searchPageVo);

    /**
     * 根据id获取admin信息
     * @param adminIdTmp
     * @return
     */
    Admin getAdminById(String adminIdTmp);
}
